package com.gouying.design.patterns.chain;

public class ChainMain {

    public static void main(String[] args) {
        Teacher teacher1 = new Teacher("张三");
        Teacher teacher2 = new Teacher("李四");
        Teacher teacher3 = new Teacher("王五");

        teacher1.setNext(teacher2);
        teacher2.setNext(teacher3);

        teacher1.handlerRequest();
    }
}
